package se.webbzon.boltzmann.game.object.inventory.page;

import se.webbzon.boltzmann.game.object.inventory.GameInventory;
import se.webbzon.boltzmann.input.Button;
import se.webbzon.boltzmann.player.Player;
import se.webbzon.oschi01.worldcamera.WorldCameraPane;

public abstract class AbstractGameInventoryPage {
	
	// The game inventory associated with this page
	private final GameInventory inventory;
	
	// The player associated with this game inventory page
	private final Player player;
	
	/*============================================================
	Constructors
	============================================================*/
	
	/** Creates a new abstract game inventory page associated with a given player. **/
	public AbstractGameInventoryPage(GameInventory inventory, Player player) {
		this.inventory = inventory;
		this.player = player;
	}
	
	/*============================================================
	Public Methods
	============================================================*/
	
	/** Draws the page in the heads-up display. **/
	public abstract void onDraw(WorldCameraPane hud);
	
	/** This method is invoked when the page is entered from the left. **/
	public abstract void onEnterLeft();
	
	/** This method is invoked when the page is entered from the left. **/
	public abstract void onEnterRight();
	
	/** This method is invoked when the player presses a button. **/
	public abstract void buttonPressed(Button button);

	/** Returns the player associated with the page. **/
	public Player getPlayer() {
		return player;
	}
	
	/** Returns the game inventory associated with this inventory page. **/
	public GameInventory getInventory() {
		return inventory;
	}
	
}
